]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
panel: Only consider St.Widgets for corner buttons
authorPhilippe Troin <phil+gitlabgnome-commits@fifi.org>
Thu, 9 May 2019 17:47:23 +0000 (10:47 -0700)
committerFlorian Müllner <florian.muellner@gmail.com>
Tue, 25 Feb 2020 18:32:30 +0000 (18:32 +0000)
We cannot syncronize styles with plain Clutter.Actors, so don't return
them when looking for corner buttons.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1047

js/ui/panel.js

index fd499f8633e19e8c14939e17e864efe055e6f94f..df8fe116035e75ec4600a43211fe7acb4df65143 100644 (file)
@@ -533,6 +533,9 @@ class PanelCorner extends St.DrawingArea {
         if (index < 0)
             return null;
 
+        if (!(children[index] instanceof St.Widget))
+            return null;
+
         if (!children[index].has_style_class_name('panel-menu') &&
             !children[index].has_style_class_name('panel-button'))
             return this._findRightmostButton(children[index]);
@@ -558,6 +561,9 @@ class PanelCorner extends St.DrawingArea {
         if (index == children.length)
             return null;
 
+        if (!(children[index] instanceof St.Widget))
+            return null;
+
         if (!children[index].has_style_class_name('panel-menu') &&
             !children[index].has_style_class_name('panel-button'))
             return this._findLeftmostButton(children[index]);